package main.java.Fzy.Test.demo;

import java.io.*;

public class CreateTxtAndRead {

    public static void main(String[] args) {

        String path = "D:/"+"1.txt";
        FileWriter fileWriter = null;
        Reader fileReader = null;

        try (BufferedWriter bw = new BufferedWriter(fileWriter);
             BufferedReader br = new BufferedReader(fileReader)){
            File file = new File(path);

            file.createNewFile();
            bw.write("I love java");

        } catch (IOException ioException) {
            ioException.printStackTrace();
        }
    }
}
